package com.dankegongyu.lib.common.util;

import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.Logger;

public class DKLog {

    private DKLog() {
    }

    public static void setLoggingEnabled(final boolean enabled) {
        Logger.addLogAdapter(new AndroidLogAdapter() {
            @Override
            public boolean isLoggable(int priority, String tag) {
                return enabled;
            }
        });
    }

    public static void d(String content) {
        Logger.d(content);
    }

    public static void i(String content) {
        Logger.i(content);
    }

    public static void w(String content) {
        Logger.w(content);
    }

    public static void e(String content) {
        Logger.e(content);
    }

    public static void e(String content, Throwable throwable) {
        Logger.e(throwable, content);
    }

    public static void wtf(String content) {
        Logger.wtf(content);
    }

    public static void json(String content) {
        Logger.json(content);
    }

    public static void xml(String content) {
        Logger.xml(content);
    }

}